package com.mob.tools.network;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;

public class HttpConnectionImpl
  implements HttpConnection
{
  private HttpResponse response;

  public HttpConnectionImpl(HttpResponse paramHttpResponse)
  {
    this.response = paramHttpResponse;
  }

  public InputStream getErrorStream()
    throws IOException
  {
    return this.response.getEntity().getContent();
  }

  public Map<String, List<String>> getHeaderFields()
    throws IOException
  {
    Header[] arrayOfHeader = this.response.getAllHeaders();
    HashMap localHashMap = null;
    if (arrayOfHeader != null)
    {
      localHashMap = new HashMap();
      int i = arrayOfHeader.length;
      for (int j = 0; j < i; j++)
      {
        Header localHeader = arrayOfHeader[j];
        ArrayList localArrayList = new ArrayList();
        localHashMap.put(localHeader.getName(), localArrayList);
        String[] arrayOfString = localHeader.getValue().split(",");
        if (arrayOfString != null)
        {
          int k = arrayOfString.length;
          for (int m = 0; m < k; m++)
            localArrayList.add(arrayOfString[m].trim());
        }
      }
    }
    return localHashMap;
  }

  public InputStream getInputStream()
    throws IOException
  {
    return this.response.getEntity().getContent();
  }

  public int getResponseCode()
    throws IOException
  {
    return this.response.getStatusLine().getStatusCode();
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.mob.tools.network.HttpConnectionImpl
 * JD-Core Version:    0.6.2
 */